﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GodPl.WorldState;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace GodPl.GameObjects
{
    public class Boulder : GameObject, IObstacle, IHittable
    {
        Texture2D sprite;
        
        public Boulder(World world, Vector2 position)
            : base(world, position)
        {
            LoadContent();
            spriteScale = 0.5f;

            localBounds.Width = (int)Math.Round(sprite.Width * spriteScale);
            localBounds.Height = (int)Math.Round(sprite.Height * spriteScale);
        }


        public override void LoadContent()
        {
            sprite = World.Content.Load<Texture2D>("Sprites/Boulder-Gray-150");
        }

        public override void Update(GameTime gameTime)
        {
            
        }

        public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(sprite, Position, null, Color.White, 0f, new Vector2(sprite.Width / 2, sprite.Height / 2), spriteScale, SpriteEffects.None, 0f);
        }



        #region IObstacle Members

        public ObstacleGravityType GravityType
        {
            get
            {
                return ObstacleGravityType.Point;
            }
        }

        #endregion

        #region IHittable Members

        public void BeHit(GodPl.GameObjects.Creatures.Briyya actor, float intensity)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
